import React, { Component, PureComponent } from 'react'

export class Home extends PureComponent {
    constructor(props){
        super(props)
        this.state={}
    }

    // shouldComponentUpdate(nextProps,nextState){
    //     // 比较自身state  和传入的state 是否相同
    //     if(this.state !== nextState || this.props !==nextProps){
    //         return true
    //     }
    //     return false
        
    // }
  render() {
    console.log('home render');

    return (
      <div>
        Home
        <p>{this.props.message}</p>
      </div>
    )
  }
}

export default Home